<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>回寄签收</title>
	<link rel="stylesheet" href="css/reset.css">
	<link rel="stylesheet" href="css/product.css">
	<link rel="stylesheet" href="css/select-big.css">
	<style>
		.content-btn {
		    margin: 0 45px;
		}
		.content-table-two {
		    margin-left: 5%;
		    width: 90%;
		}
		.content-table-two tbody tr td input{
			width: 80%;
			height: 30px;
			line-height: 30px;
			background: #F9FBFF;
			border: 1px solid #ecf2f7;
			border-radius: 15px;
			text-align: center;
		}
		.icon-delImg{
			display: inline-block;
		    background: url(images/close-1.png)no-repeat;
		    width: 25px;
		    height: 25px;
		    cursor: pointer;
		}
		.icon-delImg:hover{
			background: url(images/close-1.png)no-repeat 0 -27px;
		}
		.divLeft {
		    float: right;
		    width: auto;
		    display: inline-block;
		    margin-top: -35px;
		    margin-right: 45px;
		}
		.content-table-newservice {
		    width: 88%;
		    margin: 10px auto;
		}
		.content-table-newservice tbody tr td:nth-child(odd){
			width: 70px;
		}
		.content-table-newservice tbody tr td{
			border-bottom:1px solid #f5f5f5;
		}
		.content-table-newservice tbody tr:last-child td{
			border-bottom:0px solid #f5f5f5;
		}
		.content-table-newservice tbody tr td p{
			display: inline-block;
		    width: 640px;
		    min-height: 30px;
		    margin-top: 15px;
		    word-wrap: break-word;
		    line-height: 20px;
		}
		.content-table-newservice tbody tr td input {
		    width: 14px;
		    height: 14px;
		    margin-bottom: 0px;
		    padding-left: 10px;
		    margin-right: 5px;
		    vertical-align: middle;
		}
		.content-table-newservice:last-child tbody tr td{
			border-bottom:0px solid #f5f5f5;
		}
	</style>
</head>
<body style="background:#fff;">
<div class="main-content-box">
	<div class="content-list">
		<table class="content-table-newservice" cellspacing="0" cellpadding="0">
			<tbody>
				<tr>
					<td><span>所属部门：</span></td>
					<td id = "department"></td>
					<td><span>快递单号：</span></td>
					<td id = "tracknumber"></td>
				</tr>
				<tr>
					<td>快递公司：</td>
					<td colspan="3" id = "company"></td>
				</tr>
				<tr>
					<td>描述：</td>
					<td colspan="3"><p id = "remark"></p></td>
				</tr>
			</tbody>
		</table>
		<div class="content-btn bot-line">
			<span class="title-info">纸质合同信息</span>
		</div>
		<div class="divLeft">发送数量：<span id = "sends"></span></div>
		<form id = "seachForm">
			<input type = "hidden" name = "returntracknumber" />
		</form>
		<table class="tableOrder content-table-two matop" datatable = "true" bindForm = "seachForm" cellspacing="0" cellpadding="0" dataAction = "/contractDetail/findList">
			<tbody style = "display:none;">
				<th style = "width:100px;" title = "项目编号" name = "projectcode" type = "string"></th>
				<th style = "width:250px;" title = "项目名称" name = "projectname" type = "string"></th>
				<th style = "width:100px;" title = "客户编号" name = "custcode" type = "string"></th>
				<th style = "width:100px;" title = "客户名称" name = "custname" type = "string"></th>
				<th style = "width:100px;" title = "纸质合同编号" name = "contractcode" type = "string"></th>
				<th style = "width:100px;" title = "倒账金额" name = "transfercash" type = "string"></th>
				<th style = "width:100px;" title = "理顾姓名" name = "isname" type = "string"></th> 
			</tbody>
		</table>
		<div class="content-btn bot-line">
			<span class="title-info">纸质合同信息</span>
		</div>
		<form dataHref = "/expressInformation/returnSign" type='dataForm'>
			<input type = "hidden" name = "id">
			<table class="content-table-newservice" cellspacing="0" cellpadding="0">
				<tbody>
					<tr>
						<td>签收状态：</td>
						<td>
							<input name="status" type="radio" value = "1"><label>确认签收</label>
							<input name="status" type="radio" value = "2"><label>拒绝签收</label>
						</td>
					</tr>
					<tr id = "textarea">
						<td>拒绝说明：</td>
						<td><textarea id="reasone" cols="30" rows="3" name = "reasone"></textarea></td>
					</tr>
					<tr>
						<td></td>
						<td><button class="save-btn">确认</button></td>
					</tr>
				</tbody>
			</table>
		</form>
	</div>
</div>
	<script src="js/jquery-3.2.1.min.js"></script>
	<script type="text/javascript" src="lib/layer/2.4/layer.js"></script>
	<script src="js/select.jquery.js"></script>
	<script type="text/javascript" src = "js/util.js"></script>
	<script>
		$(document).ready(function(){
			var data = parent.data;
			$("#department").text(data.department);
			$("#tracknumber").text(data.tracknumber);
			$("input[name='returntracknumber']").val(data.tracknumber);
			$("#company").text(data.company);
			$("#remark").text(data.remark);
			$("input[name='id']").val(data.id);
			$("#sends").text(data.sends);
			$("input[type='radio']").click(function(){
				var value = $("input[name='status']:checked").val();
				if(value == "1"){
					$("#textarea").hide();
					$('#textarea').attr("disabled",true); 
				}else{
					$('#textarea').attr("disabled",false);
					$("#textarea").show();
				}
			});
			
		});
		function validateCallback(){
			var value = $("input[name='status']:checked").val();
			var textArea = $("#reasone").val();
			if(!textArea){
				return value == 1;
			}
    		return true;
    	} 
    	function submitCallback(){
    		parent.layer.closeAll();
    		parent.layer.msg("签收成功");
    		parent.goUrl("contractDistribution.html");
    	}
    	function tableCallBack(my){
    		my.next().next().remove();
    	} 
	</script>
	<script type="text/javascript" src = "js/table.js"></script>
	<script src="js/jquery-validation/1.11.0/jquery.validate.min.js" type="text/javascript"></script>
	<script type="text/javascript" src = "js/validate.js"></script>
	<script type="text/javascript" src = "js/newSubmit.js"></script>
</body>
</html>